import org.springframework.beans.BeansException;
import org.springframework.beans.factory.*;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2024/11/28
 * @description
 */
public class Person {
    private String name;
    private P2 friend;
    public Person() {}


    public Person(String name, P2 friend) {
        this.name = name;
        this.friend = friend;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }


    public P2 getFriend() {
        return friend;
    }

    public void setFriend(P2 friend) {
        this.friend = friend;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", friend=" + friend.getName() +
                '}';
    }
}
